package com.study;

import com.study.config.SpringConfiguration;
import com.study.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.sql.DataSource;

@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration("classpath:applicationContext.xml")
@ContextConfiguration(classes = SpringConfiguration.class)
public class demo3 {
	@Autowired
	private UserService userService;

//	@Autowired
//	private DataSource dataSource;

	@Test
	public void test1(){
		userService.save();
//		System.out.println(dataSource);
	}
}
